const vehicleModel = require("../../database/model-vehicle");
const create = async (input) => {
  if (Array.isArray(input)) {
    let ids = []
    for(const v of input) {
      let model = await vehicleModel.create(v);
      ids.push(model.id)
    }
    
    return ids
  } else {
    let model = await vehicleModel.create(input);
    return model.id
  }
  
};

module.exports = create